package com.jumi.microservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jumi.microservice.entity.SpecialKeyword;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SpecialKeywordMapper extends BaseMapper<SpecialKeyword> {
    /**
     *批量导入
     * @param list
     * @return
     */
    @Insert("<script>INSERT INTO special_keyword "
            + "(sensitive_words,creat_username,creat_user)"
            + "VALUES "
            + "<foreach collection='list' item='l' index='index' separator=',' >"
            + "(#{l.sensitiveWords},#{l.creatUsername},#{l.creatUser})" +
            "</foreach></script>")
    int updateSend(List<SpecialKeyword> list);
}
